package com.AAA.controller.mht;

import com.AAA.entity.LayData;
import com.AAA.entity.MyPage;
import com.AAA.entity.mht.TMhtRecord;
import com.AAA.service.Impl.mht.TmhtRecordServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("tmhtrecord")
public class TmhtRecordController {
    @Autowired
    private TmhtRecordServiceImpl service;

    @GetMapping("checkrecord")
    public LayData cherckrecord(String tel){
        return new LayData(service.checkrecord(tel));
    }
    @PostMapping("addrecord")
    public LayData add(TMhtRecord tMhtRecord){
        return new LayData(service.add(tMhtRecord));
    }
    @RequestMapping ("queryall")
    public LayData queryall(MyPage myPage,TMhtRecord t){
        return new LayData(service.queryall(myPage,t));
    }
}
